package fr.bull.learn.thread.worker;

import org.apache.log4j.Logger;

/**
 * Le travailleur de la première heure
 * @author Rouviere-X
 *
 */
public class Worker extends Thread {

	private Logger log = Logger.getLogger(getClass());
	
	/**
	 * Worker must have a task
	 */
	public Worker(Runnable task) {
		super(task);
	}
	
	@Override
	public void run() {
		log.debug("Hello my name is "+getName());
		super.run(); // execute the target
	}
	
}
